<?php 
require 'Home/ViewModel.php';
class Controller{
protected $mod;
protected $view;
function __construct()
 	{
 		$c=isset($_GET['c'])?$_GET['c']:'index';
		$m=isset($_GET['m'])?$_GET['m']:'index';
 		$this->view=new ViewModel('Home/View/'.$c.'/'.$m);//初始化View对象,c是目录m文件名c/m.php
 	}
 	public function assign($variable,$value)
 	{
 		$this->view->assign($variable,$value);
 	}
 	public function display()
 	{
 		$this->view->display();
 	}
 }
 ?>
